from apps.home.models import AppList, Employee
from django.contrib.auth.models import User

from rest_framework import serializers


class AppListSerializer(serializers.ModelSerializer):
    class Meta:
        model = AppList
        fields = "__all__"


class EmployeeSerializer(serializers.ModelSerializer):
    class Meta:
        model = Employee
        fields = "__all__"


class UserSerializer(serializers.ModelSerializer):
    detail = EmployeeSerializer()

    class Meta:
        model = User
        fields = ('id', 'username', 'first_name', 'detail')